import axios from "axios"
import {store} from "../store"
export default class Crud {
    constructor (props) {
        let {pager, request} = props
        this.pager = pager
        this.request = request
    }

    getTable () {
        return new Promise((resolve, reject)=>{
            let {url, params, query} = this.request;
            axios.get(url, {...query, ...params}).then((res) => {
                let {list} = res.data
                resolve(list)
            })
        })
    }
    formSearch(){
        const {tableData}=state.getState().crud;
        console.log('--->formSearch',tableData)
    }
}